Use accessor funtions to acces GtkImage
authorJavier Jardón <jjardon@gnome.org>
Wed, 23 Jun 2010 20:56:13 +0000 (22:56 +0200)
committerJavier Jardón <jjardon@gnome.org>
Tue, 13 Jul 2010 17:40:48 +0000 (19:40 +0200)
modules/other/gail/gailimage.c

index 6a3ea1a5f9f4687fe45cfe6bc3280e873a00d8b9..d17e59342b49f73bf9badaefe9b9c0398d3be714 100644 (file)
@@ -125,6 +125,7 @@ gail_image_get_name (AtkObject *accessible)
   GtkImage *image;
   GailImage *image_accessible;
   GtkStockItem stock_item;
+  gchar *stock_id;
   const gchar *name;
 
   name = ATK_OBJECT_CLASS (gail_image_parent_class)->get_name (accessible);
@@ -145,11 +146,12 @@ gail_image_get_name (AtkObject *accessible)
   g_free (image_accessible->stock_name);
   image_accessible->stock_name = NULL;
 
-  if (image->storage_type != GTK_IMAGE_STOCK ||
-      image->data.stock.stock_id == NULL)
+  gtk_image_get_stock (image, &stock_id, NULL);
+  if (gtk_image_get_storage_type (image) != GTK_IMAGE_STOCK ||
+      stock_id == NULL)
     return NULL;
 
-  if (!gtk_stock_lookup (image->data.stock.stock_id, &stock_item))
+  if (!gtk_stock_lookup (stock_id, &stock_item))
     return NULL;
 
   image_accessible->stock_name = elide_underscores (stock_item.label);